
#include "constants.h"

namespace tinkle {

const std::string & StartStream() {
    static const std::string _startStream("<stream:stream \
        xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' \
        to='example.com' version='1.0'>");
    return _startStream;
}

const std::string & NsClient() {
    static const std::string _nsClient("jabber:client");
    return _nsClient;
}

const std::string & NsServer() {
    static const std::string _nsServer("jabber:server");
    return _nsServer;
}

const std::string & NsStream() {
    static const std::string _nsStream("http://etherx.jabber.org/streams");
    return _nsStream;
}

const std::string & NsBind() {
    static const std::string _nsBind("urn:ietf:params:xml:ns:xmpp-bind");
    return _nsBind;
}

const std::string & NsSASL() {
    static const std::string _nsSASL("urn:ietf:params:xml:ns:xmpp-sasl");
    return _nsSASL;
}
const std::string & NsSession() {
    static const std::string _nsSession("urn:ietf:params:xml:ns:xmpp-session");
    return _nsSession;
}

const std::string & NsStanza() {
    static const std::string _nsStanza("urn:ietf:params:xml:ns:xmpp-stanzas");
    return _nsStanza;
}

const std::string & NsTLS() {
    static const std::string _nsTLS("urn:ietf:params:xml:ns:xmpp-tls");
    return _nsTLS;
}

const std::string & NsXstream() {
    static const std::string _nsXstream("urn:ietf:params:xml:ns:xmpp-streams");
    return _nsXstream;
}

const std::string & NsRoster() {
    static const std::string _nsRoster("jabber:iq:roster");
    return _nsRoster;
}

const std::string STR_STREAM("stream");
const std::string STR_FEATURES("features");
const std::string STR_AUTH("auth");
const std::string STR_MECHANISM("mechanism");
const std::string STR_SUCCESS("success");
const std::string STR_BIND("bind");
const std::string STR_SESSION("session");
const std::string STR_JID("jid");

// three kind of stanza
const std::string STR_IQ("iq");
const std::string STR_MESSAGE("message");
const std::string STR_PRESENCE("presence");

//
const std::string STR_TO("to");
const std::string STR_FROM("from");
const std::string STR_ID("id");
const std::string STR_TYPE("type");

const std::string STR_SHOW("show");
const std::string STR_STATUS("status");

const std::string STR_GMAIL_COM("gmail.com");

const std::string STR_GET("get");
const std::string STR_SET("set");
const std::string STR_RESULT("result");

const std::string STR_QUERY("query");

}